<!DOCTYPE html>
<html lang="en">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
	<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>审核记录</title>
<script src="<%=basePath%>weixin/js/mui.min.js"></script>
<script src="<%=basePath%>weixin/js/jquery.min.js"></script>
<script src="<%=basePath%>weixin/module/layer/layer.js"></script>
<link rel="stylesheet" href="<%=basePath%>weixin/css/mui.min.css" />

<link rel="stylesheet" href="<%=basePath%>weixin/css/base.css" />
<link rel="stylesheet" href="<%=basePath%>weixin/css/style.css" />

<link rel="stylesheet" href="<%=basePath%>weixin/css/order.css" />
<script src="<%=basePath%>weixin/js/page/common.js"></script>
	<script type="text/javascript">
		common.setSize();
	</script>
</head>
<body class="processList">
	<div class="process-menber" onclick="fnUserDetail()">
		<div class="portrait">
			<img src="<%=basePath%>${srm.imgpath}" onerror="this.src='<%=basePath%>weixin/img/p.png'" alt="头像" />
		</div>
		<div>
			<h3><c:if test="${srm.user_type==1||srm.user_type=='1'}">维修店：${srm.nickname}</c:if>
				<c:if test="${srm.user_type==5||srm.user_type=='5'}">服务商：${srm.nickname}</c:if></h3>
			<p>通过时间：${srm.addtime}</p>
		</div>
		<div class="result">
			<c:if test="${srm.audit_flag == '2'}">
				<span class="isRejected">审核通过</span>
			</c:if>
			<c:if test="${srm.audit_flag == '1'}">
				<span class="isRejected">平台审核中</span>
			</c:if>
			<c:if test="${srm.audit_flag == '0'}">
				<span class="isRejected">服务商审核中</span>
			</c:if>
			<c:if test="${srm.audit_flag == '-1'}">
				<span style="background: #f00;">服务商不通过</span>
			</c:if>
			<c:if test="${srm.audit_flag == '-2'}">
				<span style="background: #f00;">平台不通过</span>
			</c:if>
		</div>
	</div>
	<div class="process-content">
		<c:forEach items="${historys}" var="var" varStatus="s">
			<div class="process-menber">
				<div class="result">
					<c:if test="${var.audit_type == 'User'}"><span class="result-2">${var.audit_describe}</span></c:if>
					<c:if test="${var.audit_type == 'Moto' && var.audit_status == '-2'}"><span class="result-3">平台不通过</span></c:if>
					<c:if test="${var.audit_type == 'Moto' && var.audit_status == '2'}"><span class="result-2">平台已通过</span></c:if>
					<c:if test="${var.audit_type == 'Service' && var.audit_status == '1'}"><span class="result-2">服务商已通过</span></c:if>
					<c:if test="${var.audit_type == 'Service' && var.audit_status == '-1'}"><span class="result-3">服务商不通过</span></c:if>
					<c:if test="${var.audit_type == 'Service' && var.audit_status == '0'}"><span class="result-1">服务商审核中</span></c:if>
					<c:if test="${var.audit_type == 'Moto' && var.audit_status == '0' && historys[s.index - 1].audit_status !='0'}"><span class="result-1">平台审核中</span></c:if>
				</div>
				<c:if test="${var.audit_status != '0'}">
					<div class="result-icon result-icon-1">
							<span ></span>
					</div>
				</c:if>
				<c:if test="${var.audit_status == '0'}">
					<div class="result-icon result-icon-2">
						<span ></span>
					</div>
				</c:if>
				<div class="portrait">
					<c:if test="${var.audit_type == 'User'}"><img src="<%=basePath%>${srm.imgpath}" onerror="this.src='<%=basePath%>weixin/img/p.png'" /></c:if>
					<c:if test="${var.audit_type == 'Service'}"><img src="<%=basePath%>${var.imgpath}" onerror="this.src='<%=basePath%>weixin/img/p.png'" /></c:if>
					<c:if test="${var.audit_type == 'Moto'}"><img src="<%=basePath%>weixin/img/logo.png" /></c:if>
				</div>
				<div>
					<h3>
						<c:if test="${var.audit_type=='User'}">姓名：${srm.nickname}</c:if>
						<c:if test="${var.audit_type=='Service'}">服务商：${var.nickname}</c:if>
						<c:if test="${var.audit_type=='Moto'}">平台：开摩邦网</c:if>
					</h3>
					<p>通过时间：${var.audit_time}</p>
				</div>
			</div>
		</c:forEach>
	</div>
	<script>
		(function(mui){
			mui.init();
			var agreedBtn = document.querySelector('#agreed');
			
		})(mui);

		function fnUserDetail(){
			var userType = "${srm.user_type}";
			var userId = "${srm.sid}";
			var isAuditFlag = "${isAuditFlag}";
			if(userType == '1' || userType == 1){
				if(isAuditFlag=='0' || isAuditFlag==0){
					window.location.href="<%=basePath%>api/wx/user/members/detail?userType=1&userId="+userId;
				} else {
					window.location.href="<%=basePath%>api/wx/store/audit/detail?userId="+userId;
				}
			} else if(userType == '5' || userType == 5 ){
				if(isAuditFlag=='0' || isAuditFlag==0) {
					window.location.href="<%=basePath%>api/wx/user/members/detail?userType=5&userId="+userId;
				} else {
					window.location.href = "<%=basePath%>api/wx/service/audit/detail?userId=" + userId;
				}
			}
		}

	</script>
</body>
</html>
